package com.blog.cloud.api.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.blog.cloud.api.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

import java.io.Serial;
import java.io.Serializable;

/**
 * 博客表(Blog)表实体类
 *
 * @author 龙茶清欢
 * @since 2023-02-27 19:07:28
 */
@Getter
@Setter
@TableName("t_blog")
@Schema(name = "博客表实体", description = "博客表映射")
public class Blog extends BaseEntity implements Serializable {
    @Serial
    private static final long serialVersionUID = -51218256666263486L;

    @TableId(value = "blog_id" , type = IdType.AUTO)
    @Schema(description = "博客ID")
    private Long blogId;

    @TableField(value = "author")
    @Schema(description = "作者")
    private String author;
    
    @TableField(value = "title")
    @Schema(description = "博客标题")
    private String title;
    
    @TableField(value = "description")
    @Schema(description = "博客简介")
    private String description;
    
    @TableField(value = "content")
    @Schema(description = "博客内容")
    private String content;
    
    @TableField(value = "click_count")
    @Schema(description = "博客点击数")
    private Integer clickCount;
    
    @TableField(value = "tag_id")
    @Schema(description = "标签ID")
    private Long tagId;
    
    @TableField(value = "user_id")
    @Schema(description = "用户ID")
    private Long userId;
    
    @TableField(value = "admin_id")
    @Schema(description = "管理员ID")
    private Long adminId;
    
    @TableField(value = "picture_id")
    @Schema(description = "标题图片ID")
    private Long pictureId;
    
    @TableField(value = "blog_sort_id")
    @Schema(description = "博客分类ID")
    private Long blogSortId;
    
    @TableField(value = "sort")
    @Schema(description = "排序字段")
    private Integer sort;
    
    @TableField(value = "status")
    @Schema(description = "状态(0-开启 1-关闭)")
    private Integer status;
}

